<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xml:lang="ru"
      lang="ru">
<f:view>


    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>
            <ui:insert name="title">#{messages.home}</ui:insert> — #{store.domain}
        </title>
        <link href="#{store.templatePath}/css/core.css" rel="stylesheet" type="text/css"/>
        <link href="#{store.templatePath}/css/text.css" rel="stylesheet" type="text/css"/>
        <link href="#{store.templatePath}/css/layout.css" rel="stylesheet" type="text/css"/>

        <ui:insert name="analytics"><ui:include src="/incl/google_analytics.xhtml"/></ui:insert>
    </head>

    <body>

    <div id="box">

        <div id="head">
            <div id="logo">
                <s:link id="home" view="/browse.xhtml" propagation="none">
                    <f:param name="cat" value=""/>

                    <div id="shopname">#{store.name}</div>
                </s:link>

                <div id="hotline">#{messages.phn}: 8 800 100 31 01</div>
            </div>


            <div id="menu">
                <ui:insert name="menu">
                    <ui:repeat value="#{articles}" var="a">
                        <s:link view="/article.xhtml" propagation="none" value="#{a.name}">
                            <f:param name="articleAlias" value="#{a.urlAlias}" />
                        </s:link>
                    </ui:repeat>

                    <s:link view="/login.xhtml" propagation="none" value="#{messages.login}" rendered="#{!identity.loggedIn}" />
                    <s:link action="#{identity.logout()}" propagation="none" value="#{messages.logout}" rendered="#{identity.loggedIn}" />


                </ui:insert>
            </div>

            <ui:insert name="cart">
                <ui:include src="/incl/cart.xhtml"/>
            </ui:insert>



        </div>

        <div id="left-outer">
            <div id="left" class="column">
                <ui:insert name="sidebar">
                    <ui:include src="/incl/categories.xhtml"/>
                </ui:insert>
            </div>
        </div>


        <div id="content-outer">
            <div id="content" class="column">

                <div id="errors">
                    <ui:insert name="errors">
                        <!--<h:messages globalOnly="true"-->
                        <!--layout="table"-->
                        <!--styleClass="cntError"/>-->
                    </ui:insert>
                </div>

                <ui:debug hotkey="D"/>
                <ui:insert name="body">
                    PAGE BODY
                </ui:insert>


            </div>
            <!-- #content -->
        </div>
        <!-- #content-outer -->


        <div id="foot">
            <p id="contacts">
                #{messages.phone}: 8 800 100 31 01<br/>
                #{messages.email}: <a href="mailto:smtp@sozvezdie-store.ru">order@#{store.domain}</a>
            </p>

        </div>

    </div>
      <ui:insert name="yaMetrika"><ui:include src="/incl/ya_metrika.xhtml" /></ui:insert>
    </body>

</f:view>
</html>

